package com.leadbank.baselbf.utils;

import android.graphics.Paint;

/**
 * @ClassName: PaintUtils
 * @Description:
 * @Author: zhouzhiguo
 * @Date: 2024/12/4 17:51
 * @Version: 5.0.6
 * 上海利得金融科技集团版权所有.
 */

public class PaintUtils {

    /**
     * 根据传入的值返回文字宽度
     * @param maxData
     * @param paint
     * @return
     */
    public static int getFontWidth(float maxData, Paint paint) {
        String txt =   String.format("%,.2f",maxData);
        return (int) paint.measureText(txt);
    }

}
